package com.cazor.dg.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cazor.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.cazor.dg.mapper.DgMonitorStationMapper;
import com.cazor.dg.domain.DgMonitorStation;
import com.cazor.dg.service.IDgMonitorStationService;

/**
 * 监测站数据Service业务层处理
 * 
 * @author cazor
 * @date 2023-11-25
 */
@Service
public class DgMonitorStationServiceImpl extends ServiceImpl<DgMonitorStationMapper, DgMonitorStation> implements IDgMonitorStationService
{
    @Resource
    private DgMonitorStationMapper dgMonitorStationMapper;

    /**
     * 查询监测站数据
     * 
     * @param id 监测站数据主键
     * @return 监测站数据
     */
    @Override
    public DgMonitorStation selectDgMonitorStationById(Long id)
    {
        return dgMonitorStationMapper.selectDgMonitorStationById(id);
    }

    /**
     * 查询监测站数据列表
     * 
     * @param dgMonitorStation 监测站数据
     * @return 监测站数据
     */
    @Override
    public List<DgMonitorStation> selectDgMonitorStationList(DgMonitorStation dgMonitorStation)
    {
        return dgMonitorStationMapper.selectDgMonitorStationList(dgMonitorStation);
    }

    /**
     * 新增监测站数据
     * 
     * @param dgMonitorStation 监测站数据
     * @return 结果
     */
    @Override
    public int insertDgMonitorStation(DgMonitorStation dgMonitorStation)
    {
        dgMonitorStation.setCreateTime(DateUtils.getNowDate());
        return dgMonitorStationMapper.insertDgMonitorStation(dgMonitorStation);
    }

    /**
     * 修改监测站数据
     * 
     * @param dgMonitorStation 监测站数据
     * @return 结果
     */
    @Override
    public int updateDgMonitorStation(DgMonitorStation dgMonitorStation)
    {
        dgMonitorStation.setUpdateTime(DateUtils.getNowDate());
        return dgMonitorStationMapper.updateDgMonitorStation(dgMonitorStation);
    }

    /**
     * 批量删除监测站数据
     * 
     * @param ids 需要删除的监测站数据主键
     * @return 结果
     */
    @Override
    public int deleteDgMonitorStationByIds(Long[] ids)
    {
        return dgMonitorStationMapper.deleteDgMonitorStationByIds(ids);
    }

    /**
     * 删除监测站数据信息
     * 
     * @param id 监测站数据主键
     * @return 结果
     */
    @Override
    public int deleteDgMonitorStationById(Long id)
    {
        return dgMonitorStationMapper.deleteDgMonitorStationById(id);
    }
}
